package com.crfchina.client.configclient.Controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
public class TestController {
    @Value("${from}")
    private  String from;

    //请求地址: http://localhost:7002/from     返回信息:git-default-1.0
    @RequestMapping(value = "/from",method = RequestMethod.GET)
    public String from(){
        return from;
    }

}
